﻿#include <iostream>
#include <string>
#include "impltwo.h"

REG_CLASS(ImplTwo)
class AutoFactory
{
public:
    static Api* createApi(){
        Api* pApi = nullptr;
        // 这里传参是一个字符串，可以通过配置文件写入，非常适合配置开发
        pApi = static_cast<Api*>(CObjectFactory::createObject("ImplTwo"));
        return pApi;
    }
};

int main(int argc, char *argv[])
{
    Api *pApi =AutoFactory::createApi();
    pApi->test("哈哈哈，看不到里面有什么了");
    return 0;
}

